import request from '@/utils/request'

export default {
  listAll() {
    return request({
      url: '/message/all',
      method: 'get'
    })
  },
  listPage(currentPage, pageSize, QueryMessageDTO) {
    return request({
      url: `/message/search/${currentPage}/${pageSize}`,
      method: 'post',
      data: QueryMessageDTO
    })
  },
  deleteMessage(ids) {
    return request({
      url: `/message/delete`,
      method: 'delete',
      data: ids
    })
  },
  update(Message) {
    return request({
      url: `/message/update`,
      method: 'post',
      data: Message
    })
  },
  save(Message) {
    return request({
      url: `/message/save`,
      method: 'post',
      data: Message
    })
  },
  selectMessageById(id) {
    return request({
      url: `/message/${id}`,
      method: 'get'
    })
  }
}

